<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>コントロールパネル</title>
    
    <link href="./assets/styles/default.css" rel="stylesheet" />
	<script src="./assets/scripts/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
	<script src="./assets/scripts/plugins/jquery.tagsinput.min.js" type="text/javascript"></script>
	<script src="./assets/scripts/import.js" type="text/javascript"></script> 
	<script type="text/javascript">
		$(function() {
			back_to_search();
		});
	</script>
    
</head>
<body>

{$header_html}

<div id="container">
	<aside id="accordion">
    	<div id="aside_inner">
    		{include file='include/menu.inc.html'}
        </div>
    </aside>
    
    <article>
    	<h2><span>&nbsp;</span>Seo<p><a href="javascript:;">Open Plugins</a></p></h2>
        <nav>
        	<ul>
            	<li><a href="seo.php"><span>検索</span></a></li>
            	<li class="active"><a href="seo.php?op=regist"><span>登録</span></a></li>
		</ul>
        </nav>
        
        <section id="content">
        
        	<h3>{if $forms.id == ''}登録{else}更新{/if}</h3>
{if $phase == 'input'}
                <p class="message">内容を確認し、{if $forms.id == ''}登録{else}更新{/if}ボタンをクリックしてください。</p>
                        <form name="fm" id="fm_category" action="seo.php" method="post" enctype="multipart/form-data">
                        
                        <ul class="t_btns">
                            {if $forms.id != ''}
                                <li class="left delete"><button type="button" class="chk_delete"><em>&nbsp;</em>削除</button></li>
                                <li class="right refresh"><button type="button" class="chk_update"><em>&nbsp;</em>更新</button></li>
                            {else}
                                <li class="single add"><button type="button" class="chk_add"><em>&nbsp;</em>登録</button></li>
                            {/if}
                        </ul>
                        
                        <h4><span>&nbsp;</span>基本情報</h4>
                        <table class="formTable">
                                <tbody>
{if $forms.id != ''}
                                        <tr>
                                                <th>登録日時</th>
                                                <td>
                                                        {$forms.r_date|escape}<input type="hidden" name="forms[r_date]" value="{$forms.r_date|escape}" />
                                                </td>
                                        </tr>
                                        <tr>
                                                <th>更新日時</th>
                                                <td>
                                                        {$forms.u_date|escape}<input type="hidden" name="forms[u_date]" value="{$forms.u_date|escape}" />
                                                </td>
                                        </tr>
                                        <tr>
                                                <th>ID</th>
                                                <td>
                                                        {"%05d"|sprintf:$forms.id|escape}
                                                </td>
                                        </tr>
{/if}
                                        <tr>
                                                <th class="must">キーワード</th>
                                                <td>
                                                        <input type="text" name="forms[keyword]" class="text" value="{$forms.keyword|escape}" />
                                                        {$err.keyword nofilter}
                                                </td>
                                        </tr>
                                        <tr>
                                                <th class="must">URL</th>
                                                <td>
                                                        <input type="text" name="forms[url]" class="text" value="{$forms.url|escape}" />
                                                        {$err.url nofilter}
                                                </td>
                                        </tr>
                                        <tr>
                                                <th>告知順位</th>
                                                <td>
                                                        <input type="text" class="smartspinner" name="forms[rank]" value="{$forms.rank|escape}" />位
                                                        {$err.rank nofilter}
                                                </td>
                                        </tr>
                                        <tr>
                                                <th>告知順位連絡先</th>
                                                <td>
                                                        <input type="text" name="forms[email]" class="text" value="{$forms.email|escape}" />
                                                        {$err.email nofilter}
                                                </td>
                                        </tr>
                                </tbody>
                        </table>
                                                <p class="button">
{if $forms.id != ''}
							<button type="button" id="btn_delete"><span>削除</span></button>
							<button type="button" id="btn_update" class="submit"><span>更新</span></button>
{else}
							<button type="button" id="btn_regist" class="submit"><span>登録</span></button>
{/if}
						</p>
						<input type="hidden" name="id" value="{if isset($id)}{$id}{/if}" />
                                                <input type="hidden" name="do" value="{if !isset($forms.id) || $forms.id == ''}validate_regist_form{else}validate_update_form{/if}"/>
						<input type="hidden" name="mode" value="input" />
						<input type="hidden" name="confirm_key" value="{$confirm_key|escape}"/>
					</form>
{/if}
{if $phase == 'complete'}
					<p class="message">{$message}</p>
					<ul class="result_btn">
						<li><a href="seo.php">一覧に戻る</a></li>
						<li><a href="seo.php?op=regist">続けて新規登録する</a></li>
						<li><a href="seo.php?op=edit&id={$forms.id|escape}">登録した内容を更新する</a></li>
					</ul>
{/if}
        </section>
    </article>
    
</div>

{include file='include/footer.inc.html'}

</body>
</html>